Skip to content

Conversation

darkvision77
Copy link

It is not possible to select another backend if it is not «whitelisted».

Example. One device, multiple backends:

% lpinfo -v
direct usb://Canon/LBP3200?serial=00000000
direct captusb://Canon/LBP3200?serial=00000000

% python3 PhysicalDevice.py
Canon LBP3200 (00000000)
  <cupshelpers.Device "usb://Canon/LBP3200?serial=00000000">
  <cupshelpers.Device "captusb://Canon/LBP3200?serial=00000000">

The backend is defined correctly, but it is not displayed in the UI.

The reason is here:

if device.type == "parallel":
    ...
elif device.type == "serial":
    ...
elif device.type == "usb":
    ...
<...>
else:
    # device.type is "captusb"
    show_uris = False

show_uris = False

So, if you have multiple backends for a device, any other non-standard backend will not be visible to the end user.
The backend selection list simply won't be shown.

This patch makes the selection list visible if multiple backends are available for the device.

The selection list looks like this (with multiple backends, it's just hidden) Single backend

P.S. I just checked git blame and found that my patch literally undoes this commit: 92c531c
Any thoughts on why it was done this way?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant